<#import "/layout.html" as c>
    <#import "/list_layout.html" as list>
        <#assign alertList = []/>
        <@c.html title="Index">
        <!-- ================== 开始页面级CSS调用 ================== -->
        <link href="${pluginsRoot}bootstrap-wizard/css/bwizard.min.css" rel="stylesheet"/>
        <!-- 富文本编辑器 -->
        <link type="text/css" rel="stylesheet" href="${pluginsRoot}ueditor/themes/default/css/ueditor.css">
        <link href="${pluginsRoot}bootstrap-wizard/css/bwizard.min.css" rel="stylesheet"/>
        <!-- 日历控件 -->
        <link href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/WdatePicker.css" rel="stylesheet"/>
        <link href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/default/datepicker.css" rel="stylesheet"/>
        <!-- ================== 结束页面级CSS调用 ================== -->
        <@list.html title="帮助中心" subTitle="帮助中心" alertList=alertList permi="sys:helpclass:save" addBtn=true searchHint="请输入分类名称进行搜索">


        <@shiro.hasPermission name="sys:helpclass:edit">
            <input type="hidden" id="helpClassEdit" value="1"/>
        </@shiro.hasPermission>
        <@shiro.hasPermission name="sys:helpclass:del">
            <input type="hidden" id="helpClassDel" value="1"/>
        </@shiro.hasPermission>
<!-- 结束用户权限参数 -->

    <!-- 开启添加分类模态窗口 -->
        <div class="modal fade" id="addModal" tabindex="-1" role="dialog">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 class="modal-title"> 添加分类 <a class="btn btn-info btn-xs m-l-10" role="button"
                                                         data-toggle="collapse" href="#OperationTipsAdd"
                                                         aria-expanded="true" title="操作提示"> <i
                                class="fa fa-exclamation"></i> &nbsp;提示 </a></h4>
                    </div>
                    <div class="modal-body">
                        <form id="addClassForm" class="form-horizontal form-bordered p-0"  autocomplete="off" action="${adminRoot}helpclass/json/add" method="post"
                              data-parsley-validate="true">
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">分类名称<i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                                <div class="col-md-9 col-sm-8">
                                    <input type="text" name="className" class="form-control" placeholder="请输入分类名称"
                                           data-tip="tooltip" data-placement="auto"
                                           data-original-title="必填项，2-20个大小写英文字母、符号或数字。" data-parsley-required="true"
                                           data-parsley-length="[2,20]"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">排序<i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                                <div class="col-md-9 col-sm-8">
                                    <input type="text" name="sortNo" class="form-control" placeholder="请输入排序"
                                           data-tip="tooltip" data-placement="auto" data-parsley-type="number" value="0"
                                           data-parsley-required="true" data-original-title="排序从0~999顺序排列，默认排序为0。"
                                           data-parsley-range="[0, 999]"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <dt class="control-label col-md-2 col-sm-3">是否显示<i class="f-s-14 text-danger">*</i>&nbsp;:</dt>
                                <dd class="col-md-9 col-sm-8">
                                    <ul class="ncsc-form-radio-list">
                                        <li><label class="radio-inline"><input id="specialState1" name="status"
                                                                               value="1" type="radio">显示</label></li>
                                        <li><label class="radio-inline"><input id="specialState2" name="status"
                                                                               value="2" type="radio">隐藏</label></li>
                                    </ul>
                                </dd>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a>
                        <a href="javascript:;" class="btn btn-primary" data-loading-text="Loading..."
                           nc-ajax-submit-target="addClassForm" nc-ajax-submit>确认提交</a></div>
                </div>
            </div>
        </div>
    <!-- 结束添加分类模态窗口 -->

<!-- 开启编辑分类模态窗口 -->
        <div class="modal fade" id="editClassModal" tabindex="-1" role="dialog">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 class="modal-title"> 编辑分类 <a class="btn btn-info btn-xs m-l-10" role="button"
                                                         data-toggle="collapse" href="#OperationTipsAdd"
                                                         aria-expanded="true" title="操作提示"> <i
                                class="fa fa-exclamation"></i> &nbsp;提示 </a></h4>
                    </div>
                    <div class="modal-body">
                        <form id="editClassForm" class="form-horizontal form-bordered p-0"  autocomplete="off" action="${adminRoot}helpclass/json/edit"
                              method="post" data-parsley-validate="true">
                            <input type="hidden" name="id" value="">
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">分类名称<i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                                <div class="col-md-9 col-sm-8">
                                    <input type="text" name="className" class="form-control" placeholder="请输入分类名称"
                                           data-tip="tooltip" data-placement="auto"
                                           data-original-title="必填项，3-20个大小写英文字母、符号或数字。" data-parsley-required="true"
                                           data-parsley-length="[3,20]"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">排序<i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                                <div class="col-md-9 col-sm-8">
                                    <input type="text" name="sortNo" class="form-control" placeholder="请输入排序"
                                           data-tip="tooltip" data-placement="auto" value="0" data-parsley-type="number" data-parsley-range="[0, 999]"
                                           data-parsley-required="true" data-original-title="排序从0~999顺序排列，默认排序为0。"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <dt class="control-label col-md-2 col-sm-3">是否显示<i class="f-s-14 text-danger">*</i>&nbsp;:</dt>
                                <dd class="col-md-9 col-sm-8">
                                    <ul class="ncsc-form-radio-list">
                                        <li><label class="radio-inline"><input id="specialState3" name="status"
                                                                               value="1" type="radio">显示</label></li>
                                        <li><label class="radio-inline"><input id="specialState4" name="status"
                                                                               value="2" type="radio">隐藏</label></li>
                                    </ul>
                                </dd>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a>
                        <a href="javascript:;" class="btn btn-primary" data-loading-text="Loading..."
                           nc-ajax-submit-target="editClassForm" nc-ajax-submit>确认提交</a></div>
                </div>
            </div>
        </div>
<!-- 结束编辑分类模态窗口 -->

 <!--开启内容管理模态窗口 -->
        <div class="modal fade" id="contentModal" tabindex="-1" role="dialog" style="overflow:scroll">
            <div class="modal-dialog modal-lg">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 class="modal-title">内容管理<a class="btn btn-info btn-xs m-l-10" role="button"
                                                       data-toggle="collapse" href="<#--#OperationTips-->"
                                                       aria-expanded="false" title="操作提示"><i
                                class="fa fa-exclamation"></i>&nbsp;提示</a></h4>
                    </div>
                    <div class="modal-body">
                        <div class="clearfix">
                            <div class="col-md-3 p-l-0">
                                <a href="#addContentModal" class="btn btn-success pull-left m-r-5 m-b-5"
                                   data-toggle="modal"> <i class="fa fa-lg fa-plus m-r-5"></i>新增数据</a>
                            </div>
                        </div>
                        <div id="dtGridContainerContent" class="dt-grid-container"></div>
                        <div id="dtGridToolBarContainerContent" class="dt-grid-toolbar-container"></div>
                    </div>
                </div>
            </div>
        </div>
<!--结束内容管理模态窗口 -->
        <!-- 开启添加内容模态窗口 -->
        <div class="modal fade" id="addContentModal" tabindex="-1" role="dialog" style="overflow:scroll">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 class="modal-title"> 添加 <a class="btn btn-info btn-xs m-l-10" role="button" data-toggle="collapse" href="#OperationTipsAdd" aria-expanded="true" title="操作提示"> <i class="fa fa-exclamation"></i> &nbsp;提示 </a> </h4>
                    </div>
                    <div class="modal-body">
                        <form  id="addContentForm" class="form-horizontal form-bordered p-0"  autocomplete="off" action="${adminRoot}helpcontent/json/add" method="post" data-parsley-validate="true">
                            <input type="hidden" name="classId" value="" id="currentClassId">
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">标题<i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                                <div class="col-md-9 col-sm-8">
                                <input type="text" name="title" class="form-control" placeholder="请输入标题" data-tip="tooltip" data-placement="auto" data-original-title="必填项，2-20个大小写英文字母、符号或数字。" data-parsley-required="true" data-parsley-length="[2,20]"/>
                                </div>
                             </div>
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">排序<i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                                <div class="col-md-9 col-sm-8">
                                <input type="text" name="sortNo" class="form-control" placeholder="请输入排序" data-tip="tooltip" data-placement="auto"  data-parsley-type="number" data-parsley-required="true"  value="0" data-original-title="排序从0~999顺序排列，默认排序为0。" data-parsley-range="[0,999]"/>
                            </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">内容 <i class="f-s-14 text-danger">*</i>&nbsp;:</label>
                                <div class="col-md-9 col-sm-8"><script id="contnetAdd" style="width: 100%; height: 200px;"></script></div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer"> <a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a>
                        <a href="javascript:;"  onclick="" class="btn btn-primary" data-loading-text="Loading..." nc-ajax-submit-target="addContentForm" nc-ajax-submit>确认提交</a> </div>
                </div>
            </div>
        </div>
        <!-- 结束添加内容模态窗口 -->
        <!-- 开启编辑内容模态窗口 -->
        <div class="modal fade" id="editContentModal" tabindex="-1" role="dialog" style="overflow:scroll">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h4 class="modal-title"> 编辑 <a class="btn btn-info btn-xs m-l-10" role="button" data-toggle="collapse" href="#OperationTipsEdit" aria-expanded="true" title="操作提示"> <i class="fa fa-exclamation"></i> &nbsp;提示 </a> </h4>
                    </div>
                    <div class="modal-body">
                        <form id="editContentForm" class="form-horizontal form-bordered p-0" autocomplete="off" action="${adminRoot}helpcontent/json/edit" method="post" data-parsley-validate="true">
                            <input type="hidden" name="id" value="">
                            <input type="hidden" name="classId" value="">
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">标题<i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                                <div class="col-md-9 col-sm-8">
                                   <input type="text" name="title" class="form-control" placeholder="请输入分类名称" data-tip="tooltip" data-placement="auto" data-original-title="必填项，2-20个大小写英文字母、符号或数字。" data-parsley-required="true" data-parsley-length="[2,20]"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">排序<i class="f-s-14 text-danger">*</i>&nbsp;: </label>
                                <div class="col-md-9 col-sm-8">
                                    <input type="text" name="sortNo" class="form-control" placeholder="请输入排序" data-tip="tooltip" data-placement="auto"  data-parsley-type="number" data-parsley-required="true"  value="0" data-original-title="排序从0~999顺序排列，默认排序为0。" data-parsley-range="[0,999]"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="control-label col-md-2 col-sm-3">内容 <i class="f-s-14 text-danger">*</i>&nbsp;:</label>
                                <div class="col-md-9 col-sm-8"><script id="contnetEdit" style="width: 100%; height: 200px;"></script></div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer"> <a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a>
                        <a href="javascript:;" class="btn btn-primary refresh" data-loading-text="Loading..." nc-ajax-submit-target="editContentForm" nc-ajax-submit>确认提交</a> </div>
                </div>
            </div>
        </div>
        </div>
        <!-- 结束编辑内容模态窗口 -->
</@list.html>
<!-- ================== 开始页面级JavaScrip调用 ================== -->
<script src="${pluginsRoot}bootstrap-wizard/js/bwizard.js"></script>
<!-- 富文本编辑器 -->
<script src="${pluginsRoot}ueditor/ueditor.config.js"></script>
<script src="${pluginsRoot}ueditor/ueditor.all.js"></script>
<!-- 表单checkbox项 -->
<script src="${pluginsRoot}bootstrap-switch/bootstrap-switch.min.js"></script>
<!-- 日历控件 -->
<script src="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/WdatePicker.js" defer="defer"></script>
<script src="${jsRoot}propaganda/helpcenter.handle.js"></script>
<!-- ================== 结束页面级JavaScrip调用 ================== -->
</@c.html>
